import EventDispatcher from "../event/EventDispatcher";

const DispatcherList: EventDispatcher[] = [];

export const DebugDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[9] = DebugDispatcher;
export const AccDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[10] = AccDispatcher;
export const PlayerDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[11] = PlayerDispatcher;
export const TurntableDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[12] = TurntableDispatcher;
export const HeroDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[13] = HeroDispatcher;
export const ChatDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[14] = ChatDispatcher;
export const SkillDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[21] = SkillDispatcher;
export const StageDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[22] = StageDispatcher;
export const WeaponDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[23] = WeaponDispatcher;
export const BarDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[24] = BarDispatcher;
export const PropertyDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[25] = PropertyDispatcher;
export const SignDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[26] = SignDispatcher;
export const LuckyDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[27] = LuckyDispatcher;
export const ChallengeDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[28] = ChallengeDispatcher;
export const ExchangeDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[29] = ExchangeDispatcher;
export const AchievementDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[30] = AchievementDispatcher;
export const BattleDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[31] = BattleDispatcher;
export const GuideDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[32] = GuideDispatcher;
export const CustomerServiceDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[33] = CustomerServiceDispatcher;
export const RankDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[34] = RankDispatcher;
export const PetDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[35] = PetDispatcher;
export const PromoteDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[36] = PromoteDispatcher;
export const InviteDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[37] = InviteDispatcher;
export const MiscDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[38] = MiscDispatcher;
export const PaymentDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[39] = PaymentDispatcher;
export const TalentDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[40] = TalentDispatcher;
export const ArenaDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[41] = ArenaDispatcher;
export const RoleDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[42] = RoleDispatcher;
export const VipDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[43] = VipDispatcher;
export const GiftBagDispatcher: EventDispatcher = new EventDispatcher();
DispatcherList[44] = GiftBagDispatcher;

export function fillDispatcher(parentNode: cc.Node): void {
  let coreNode: cc.Node;
  coreNode = new cc.Node("node-proto-dispatcher-debug");
  DebugDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-acc");
  AccDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-player");
  PlayerDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-turntable");
  TurntableDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-hero");
  HeroDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-chat");
  ChatDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-skill");
  SkillDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-stage");
  StageDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-weapon");
  WeaponDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-bar");
  BarDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-property");
  PropertyDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-sign");
  SignDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-lucky");
  LuckyDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-challenge");
  ChallengeDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-exchange");
  ExchangeDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-achievement");
  AchievementDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-battle");
  BattleDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-guide");
  GuideDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-customer_service");
  CustomerServiceDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-rank");
  RankDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-pet");
  PetDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-promote");
  PromoteDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-invite");
  InviteDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-misc");
  MiscDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-payment");
  PaymentDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-talent");
  TalentDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-arena");
  ArenaDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-role");
  RoleDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-vip");
  VipDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
  coreNode = new cc.Node("node-proto-dispatcher-gift_bag");
  GiftBagDispatcher.node = coreNode;
  parentNode.addChild(coreNode);
}

export { DispatcherList };
